package com.ray.mapper;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.ray.bean.AccountStatementBean;
import com.ray.bean.AdvancePaymentBean;
import com.ray.bean.BankBean;
import com.ray.bean.ReceiptPaymentRecordBean;
import com.ray.bean.ReceiptPaymentRecordBean.ReceivePaymentDetailRecord;
import com.ray.bean.WarehouseInOutDetailBean;
import com.ray.bean.WarehouseInSumMoneyBean;

/**
 * 财务接口mapper
 * @author Administrator
 */
public interface FinanceMapper {

	/**
	 * 获取所有银行卡信息
	 * @param map
	 * @return
	 */
	List<BankBean> getAllBank(Map map);

	/**
	 * 保存银行卡
	 * @param map
	 * @return
	 */
	int addBank(Map map);

	/*
	 * 修改银行卡信息
	 */
	int updateBank(Map map);

	/**
	 * 获取收付款记录
	 * @param map
	 * @return
	 */
	List<ReceiptPaymentRecordBean> getReceiptPaymentRecordHaveDetail(Map<String, Object> map);

	/**
	 * 修改外协收付款金额
	 * @param detailRecords
	 * @return
	 */
	int updatePutOutReceiptPaymentPrice(@Param("list")List<WarehouseInSumMoneyBean> detailRecords);

	/**
	 * 修改仓库收付款金额
	 * @param detailRecords
	 * @return
	 */
	int updateReceiptPaymentPrice(@Param("list")List<WarehouseInSumMoneyBean> detailRecords);

	/**
	 * 审核收付款信息
	 * @param map
	 * @return
	 */
	int approvalReceiptPaymentRecord(Map<String, Object> map);
	/**
	 * 通过出入库id获取出入库信息
	 * @param inOutIdSet
	 * @return
	 */
	List<WarehouseInSumMoneyBean> getInOutListBtInOutId(@Param("inOutIdSet")Set<String> inOutIdSet);

	/**
	 * 通过出入库id获取外协信息
	 * @param inOutIdSet
	 * @return
	 */
	List<WarehouseInSumMoneyBean> getPutOutListByInOutId(@Param("inOutIdSet")Set<String> inOutIdSet);

	/**
	 * 获取收付款记录主信息
	 * @param map
	 * @return
	 */
	List<ReceiptPaymentRecordBean> getReceivePaymentRecord(Map map);
	int getReceivePaymentRecordCount(Map map);

	/**
	 * 获取查询条件的金额汇总
	 * @param map
	 * @return
	 */
	Map  getReceiptPaymentRecordSum(Map map);

	/**
	 * 通过收付款id获取收付款记录
	 * @param string
	 * @return
	 */
	List<ReceiptPaymentRecordBean> getReceiptPaymentRecordByInOutId(@Param("inOutId")String inOutId);

	/**
	 * 通过收付款id获取某一次收付款明细
	 * @param map
	 * @return
	 */
	List<ReceiptPaymentRecordBean> getReceiptPaymentRecordByMainId(Map map);

	/**
	 * 获取外协付款信息
	 * @param map
	 * @return
	 */
	List<ReceiptPaymentRecordBean> getPutOutReceiptPaymentRecordByMainId(Map map);

	/**
	 * 修改银行卡余额
	 * @param bankList
	 * @param string 
	 * @return
	 */
	int updateBankCardBalance(@Param("bankList")List<BankBean> bankList,@Param("loginCompany") String string);

	/**
	 * 将收付款记录改为已核销状态
	 * @param map
	 * @return
	 */
	int updatePaymentReceiveIsVerification(Map map);

	/**
	 * 设置收付款记录开票信息
	 * @param map
	 * @return
	 */
	int supplementInvoicData(Map map);

	/**
	 * 添加预收付款信息
	 * @param map
	 * @return
	 */
	int advancePayAdd(Map map);

	/**
	 * 获取预收付款信息
	 * @param map
	 * @return
	 */
	List<AdvancePaymentBean> getAdvancePaymentList(Map map);
	int getAdvancePaymentListCount(Map map);

	/**
	 * 审核预收付款信息
	 * @param map
	 * @return
	 */
	int approvalAdvancePay(Map map);

	/**
	 * 获取预收付款记录
	 * @param map
	 * @return
	 */
	Map getAdvancePayRecordSum(Map map);

	/**
	 * 获取对账单信息
	 * @param map
	 * @return
	 */
	List<AccountStatementBean> getAccountStatement(Map map);

	/**
	 * 修改预付款已使用状态
	 * @param advancePaymenteceiveId
	 * @return
	 */
	int advancePaymentReceiveIsUsed(@Param("advancePaymenteceiveId")String advancePaymenteceiveId);

    
} 
